//
//  HZEmotionModel.swift
//  weibo002
//
//  Created by 黑眼圈 on 16/4/27.
//  Copyright © 2016年 heiyan. All rights reserved.
//

import UIKit

class HZEmotionModel: NSObject,NSCoding {
    
    //表情描述字符串
    var chs:String?
    //图片表情的图片名
    var png:String?
    //表情的类型
    var type:String?
    //emoji 表情的 code
    var code:String?
    
    //获取文件夹的前缀
    var pathString:String?
    
    
    init(dict:[String:AnyObject]) {
        super.init()
        
        setValuesForKeysWithDictionary(dict)
    }
    
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
    
    
    //反归档
    required init?(coder aDecoder: NSCoder) {
        
        chs = aDecoder.decodeObjectForKey("chs") as? String
        code = aDecoder.decodeObjectForKey("code") as? String
        type = aDecoder.decodeObjectForKey("type") as? String
        png = aDecoder.decodeObjectForKey("png") as? String
        pathString = aDecoder.decodeObjectForKey("pathString") as? String
    }
    
    //归档的方法
    func encodeWithCoder(aCoder: NSCoder) {
        
        aCoder.encodeObject(chs, forKey: "chs")
        aCoder.encodeObject(code, forKey: "code")
        aCoder.encodeObject(type, forKey: "type")
        aCoder.encodeObject(png, forKey: "png")
        aCoder.encodeObject(pathString, forKey: "pathString")

    }
    
    
    
    
    
    
    
    
    
    
    

}
